package demo;

import java.util.Date;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-05-20
 * Time:20:24
 */
//抽象类
abstract class Shape{
    public int a;
    public static int b;
    public void func(){

    }
    //抽象方法
    public abstract void draw();
}
class Ract extends Shape{
    @Override
    public void draw() {
        System.out.println("画一个矩形");
    }
}
class Flower extends Shape{

    @Override
    public void draw() {
        System.out.println("画一朵画");
    }
}
public class Test {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        drawMap(new Flower());
        drawMap(new Ract());
    }
}


